<?php
/**
 * 跃飞科技版权所有 @2017
 * User: 钟贵廷
 * Date: 2017/5/24
 * Time: 14:06
 */

namespace app\home\validate;

use think\Validate;

class Messages  extends Validate
{
    protected $rule = [
        'company'  =>  'require',
        'business' =>  'require',
        'mobile_phone' =>  'require|regex:^1[358]\d{9}$',
        'remark' =>  'require|max:255',
    ];

    protected $message  =   [
        'company.require' => '公司名称必填',
        'business.require' => '公司行业必填',
        'mobile_phone.require' => '联系手机必填',
        'mobile_phone.regex' => '手机格式不正确',
        'remark.require' => '备注留言必填',
        'remark.max' => '留言不能超过255个字',
    ];
}